package com.eastfair.venuebooking.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.pay.dto.PaymentPlanDTO;
import com.eastfair.pay.dto.PaymentPlanPageQuery;
import com.eastfair.pay.vo.PaymentPlanVO;

import java.util.List;

/**
 * 付款计划 Service.
 *
 * @author dqq
 * @date 2022 /6/24
 */
public interface VenueBookingPaymentPlanService {

    /**
     * 合同id查询支付计划列表.
     *
     * @param contractId the contract id
     * @return the list
     */
    List<PaymentPlanVO> queryByContractId(Long contractId);

    /**
     * 分页查询支付计划.
     *
     * @param params the params
     * @return the page
     */
    Page<PaymentPlanVO> queryPage(PageParams<PaymentPlanPageQuery> params);

    Page<PaymentPlanVO> listForContractManage(PageParams<PaymentPlanPageQuery> params);

    /**
     * 计划付款时间范围查询未付款的付款计划.
     *
     * @param startPlanPayTime the start plan pay time
     * @param endPlanPayTime   the end plan pay time
     * @return the list
     */
    List<PaymentPlanVO> queryByPlanPayTime(String startPlanPayTime, String endPlanPayTime);

    /**
     * 批量保存或更新付款计划.
     *
     * @param list the list
     * @return the boolean
     */
    boolean saveOrUpdateBatch(List<PaymentPlanDTO> list);

    /**
     * 移除付款计划.
     *
     * @param id the id
     * @return the boolean
     */
    boolean removePaymentPlanById(Long id);
}
